package Pet.Management.service;

import Pet.Management.domain.entity.Payment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface PaymentService {
    /**
     * 创建支付记录
     */
    Payment createPayment(Payment payment);

    /**
     * 更新支付状态
     */
    Payment updatePaymentStatus(Long paymentId, String status);

    /**
     * 获取支付记录
     */
    Payment getPayment(Long paymentId);

    /**
     * 获取支付详情
     */
    Payment getPaymentDetails(Long paymentId);

    /**
     * 获取用户的支付记录
     */
    Page<Payment> getUserPayments(Long userId, Pageable pageable);

    /**
     * 获取订单的支付记录
     */
    Payment getOrderPayment(Long orderId);

    /**
     * 验证支付金额
     */
    boolean validatePaymentAmount(Long orderId, Double amount);

    /**
     * 处理支付回调
     */
    Payment handlePaymentCallback(String outTradeNo, String transactionId, String status);

    /**
     * 退款
     */
    Payment refund(Long paymentId, Double amount, String reason);

    /**
     * 取消支付
     */
    Payment cancelPayment(Long paymentId);
} 